#ifndef	_ESTOOLS_H_
#define	_ESTOOLS_H_

#include	"stdlib.h"
#include	"time.h"
#include	"stdio.h"
#include 	"stdlib.h"
#include 	"fcntl.h"
#include 	"stdio.h"
#include 	"sys/types.h"
#include 	"sys/stat.h"
#include 	"signal.h"
#include 	"sys/types.h"
#include 	"errno.h"
#include	"string.h"

#ifndef		COMMANDCHAR
#define		COMMANDCHAR ';'
#endif

#ifndef		SPLITCHAR
#define		SPLITCHAR '='
#endif

#ifdef DLLEXPORT
#undef DLLEXPORT
#endif

#ifdef ESTOOLS_EXPORTS
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
#ifdef	_WIN32
#pragma comment(lib,"estools.lib")
#endif

#endif


extern "C" DLLEXPORT void TrimAll(char * pSource,char * pTarget);
extern "C" DLLEXPORT void TrimLeft(char * pSource,char * pTarget);
extern "C" DLLEXPORT long ExtractKey(char * pSource, char * pKey, char * pValue);
extern "C" DLLEXPORT void TrimRight(char * pSource,char * pTarget);
extern "C" DLLEXPORT long ExtractString(char * pSource, char chtok,char * pString);
extern "C" DLLEXPORT long ExtractCommand(char * pSource, char * pCommand);
extern "C" DLLEXPORT void	ShowCurTime();
extern "C" DLLEXPORT void GetCurTime(char * pTime);
extern "C" DLLEXPORT void GetCurTimeStr(char * pTime);
extern "C" DLLEXPORT void GetCurDateStr(char * pTime);
extern "C" DLLEXPORT void GetCurDate(long * nYear,long * nMon,long *nDay);
extern "C" DLLEXPORT long SplitKey(char * pSource, char * pKey, char * pValue);
extern "C" DLLEXPORT void    GetNowDateStr(char * pTime);
extern "C" DLLEXPORT void    GetNowTimeStr(char * pTime);
extern "C" DLLEXPORT void    GetYesterdayDateStr(char * pTime);

extern "C" DLLEXPORT char ** CreateStrList(char * pSource,char ch);
extern "C" DLLEXPORT void	DeleteStrList(char **pStrList);
extern "C" DLLEXPORT long	GetStrListCount(char **PStrList);
extern "C" DLLEXPORT void	ChopStr(char * pSource,char chChop);


#endif



